#!/bin/bash
IPY_CONFIG_PATH=~/.ipython/profile_default/ipython_config.py
# pip install -U powerline-status || true
pip install git+https://github.com/powerline/powerline.git@develop -U || true
if [ ! -e "~/.ipython/profile_default/" ]; then mkdir -p ~/.ipython/profile_default/; fi
echo "import os" >$IPY_CONFIG_PATH

echo "from powerline.bindings.ipython.since_7 import PowerlinePrompts" >>$IPY_CONFIG_PATH
echo "c = get_config()" >>$IPY_CONFIG_PATH
echo "c.TerminalInteractiveShell.simple_prompt = False" >>$IPY_CONFIG_PATH
echo "c.TerminalInteractiveShell.prompts_class = PowerlinePrompts" >>$IPY_CONFIG_PATH
echo "c.InteractiveShellApp.extensions = ['autoreload']" >>$IPY_CONFIG_PATH
echo "c.InteractiveShellApp.exec_lines = ['%autoreload 3']" >>$IPY_CONFIG_PATH
